\name{CreateFields}
\alias{CreateFields}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Create  fields in the dataset
}
\encoding{UTF-8}
\description{
根据指定的属性字段信息，创建属性字段。
}
\usage{
CreateFields(dtv, field.infos)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{dtv}{
  矢量数据集。
}
  \item{field.infos}{
  属性字段信息。
  field.infos 为 list，list中每个元素可以为\code{\link{FieldInfo-class}}对象，也可以为一个list，其中每个list中含"name","type","caption","default","systemField","required","maxLength"等参数。
  }
}
\details{
%%  ~~ If necessary, more details than the description above ~~
}
\value{
创建成功返回TRUE，否则返回FALSE
}
\references{
%% ~put references to the literature/web site here ~
}
\author{
%%  ~~who you are~~
}
\note{
%%  ~~further notes~~
}

%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
\code{\link{GetFieldInfos}}
}
\examples{

server <- system.file("/sampledata/ChangChun.udb", package="RSuperMap")
ds <- OpenDatasource(server, alias = "test", engine = "udb")
name <- GetAvailableDatasetName(ds, "point")
result <- CreateDatasetVector(ds, name, "Point")
if(!is.null(result)){
  ds <- result[["datasource"]]
  dtv1 <- result[["datasetVector"]]
  
  fieldInfo1 <- list(name="id1", type="Int32")
  fieldInfo2 <- list(name="id2", type="Double")
  fieldInfos <- list()
  fieldInfos[[1]] <- fieldInfo1
  fieldInfos[[2]] <- fieldInfo2
  CreateFields(dtv1, fieldInfos)

  fieldInfo3 <- new("FieldInfo", name="id3", type="Int32")
  fieldInfo4 <- new("FieldInfo", name="id4", type="WText", maxLength=255L)
  fieldInfos2 <- list()
  fieldInfos2[[1]] <- fieldInfo3
  fieldInfos2[[2]] <- fieldInfo4
  CreateFields(dtv1, fieldInfos2)
}
ds <- CloseDatasource(ds)

}

% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{ DatasetVector }% use one of  RShowDoc("KEYWORDS")
\keyword{supermap}